package com.markyao.controller;

import com.markyao.service.ProductService;
import com.markyao.vo.Result;
import com.markyao.vo.SearchVo;
import com.markyao.vo.parmas.SearchParma;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("search")
public class SearchController {
    @Autowired
    ProductService productService;

    @PostMapping("list")
    public Result findBySearch(@RequestBody SearchParma searchParma){
        //search就是输入的搜索信息
        System.out.println("---------"+searchParma);
        return productService.getPageList(searchParma);
    }

}
